library(ggplot2)

dfPEG<-read.csv("1L2_PEG.csv")

#create line plot
dfPEG<-data
write.csv(dfPEG, file = "1L2_PEG.csv", row.names = FALSE)
#create bar plot
ggplot(dfPEG, aes(x=PEG, y=Mean_RelativeActivity, fill=PEG)) +
  geom_bar(stat="identity", width = 0.4, show.legend = FALSE)+
  geom_errorbar(data = dfPEG, aes(ymin=Mean_RelativeActivity-StDev, ymax=Mean_RelativeActivity+StDev), width = 0.2)+scale_y_continuous(limits= c(0,200))+
  theme_minimal() +
  labs(
    title = "",
    x = "",
    y = "Relative DNase activity (%)"
  )+
  theme(axis.text.x = element_text(size = 20), axis.text.y = element_text(size = 16), axis.title.y = element_text(size=20), axis.title.x = element_text(size=20), title = element_text(size = 16), legend.title = element_blank(), legend.text = element_text(size=16), plot.margin = margin(0.5, 0.5, 0.5, 0.5, "cm"))

ggsave("1L2_PEG.pdf", width = 15, height = 12, units = "cm")